﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[proc_txcx_Create]
	(
	@CompanyId INT,
	@CompanyName NVARCHAR(200),
	@userid VARCHAR(20),
	@username NVARCHAR(200),
	@tx_PaymentTypeId INT,
	@tx_PaymentTypeName NVARCHAR(50),
	@tx_BankId INT,
	@tx_BankName NVARCHAR(50),
	@tx DECIMAL(18,2),
	@cx DECIMAL(18,2),	
	@cx_PaymentTypeId INT,
	@cx_PaymentTypeName NVARCHAR(50),
	@cx_BankId INT,
	@cx_BankName NVARCHAR(50),
	@memo NVARCHAR(500)
	)
AS
BEGIN
	INSERT INTO [txcx]
           ([CompanyId]
           ,[CompanyName]
           ,[tx]
           ,[tx_PaymentTypeId]
           ,[tx_PaymentTypeName]
           ,[tx_BankId]
           ,[tx_BankName]
           ,[cx]
           ,[cx_PaymentTypeId]
           ,[cx_PaymentTypeName]
           ,[cx_BankId]
           ,[cx_BankName]
           ,[memo]
           ,[createdate]
           ,[userid]
           ,[username])
     VALUES
           (@CompanyId
           ,@CompanyName
           ,@tx
           ,@tx_PaymentTypeId
           ,@tx_PaymentTypeName
           ,@tx_BankId
           ,@tx_BankName
           ,@cx
           ,@cx_PaymentTypeId
           ,@cx_PaymentTypeName
           ,@cx_BankId
           ,@cx_BankName
           ,@memo
           ,GETDATE()
           ,@userid
           ,@username)
END
